package com.hnevc.yinqi;

public class Work09 {
    public static void main(String[] args) {
        String[]names={"张三","李四","王五","小黑","小黄","小白"};
        int count=0;
        for (int i= 0;i<names.length;i++){
            if (names[i].indexOf("王")==0){
                count++;
            }
        }
        System.out.println("人数为"+count);
    }
}
